package designer.factory.normalFactory;

import designer.factory.JavaProgrammer;
import designer.factory.PhpProgrammer;
import designer.factory.demoInterface.IProgrammer;

/**
 * Created by tanlee on 2016/4/12.
 */
public class ProgrammerFactoryB implements IProgrammerFactory{

    @Override
    public IProgrammer createProgrammer(String type) {
        IProgrammer IProgrammer = null;
        if(type.equals("JAVA")){
            IProgrammer = new JavaProgrammer();
        }
        else if(type.equals("ANDROID")){
            //android培训的是java程序员
            IProgrammer = new JavaProgrammer();
        }
        else if(type.equals("PHP")){
            IProgrammer = new PhpProgrammer();
        }
        return IProgrammer;
    }
}
